home *** CD-ROM | disk | FTP | other *** search
/ United Public Domain Gold 2 / United Public Domain Gold 2.iso / utilities / pu168a.dms / pu168a.adf / Scripts / tutorial5.art < prev    next >
Text File  |  1991-10-20  |  3KB  |  98 lines

  1. !---------------------------------------------------------------
  2. !
  3. ! TUTORIAL5 - RayDance tutorial script #5.
  4. !
  5. ! This script demonstrates surfaces that are not perfectly
  6. ! smooth mirrors.  This is simulated using the kb (bumpiness)
  7. ! coefficient.
  8. !
  9. ! Concepts include :
  10. !
  11. !  o Declaring PHONG surfaces with bumpiness for hazy
  12. !    reflections.
  13. !
  14. !  o A gingham pattern ground plane
  15. !
  16. !---------------------------------------------------------------
  17.  
  18. ! Use a print statement to display descriptive text on the
  19. ! message window.
  20.  
  21.  
  22. ? "TUTORIAL5 - This script defines a scene with one row of\n",
  23.   "spheres floating over a checkerboard.  kb will change\n",
  24.   "from 0.00 to 0.20 moving from left to right.  All spheres\n",
  25.   "are colored orange with a km of 0.7  There is only mirror\n",
  26.   "reflection.  Specular hiliting is turned off.  Making kb\n",
  27.   "non-zero should cause hazy reflections, however, the best\n",
  28.   "results will be obtained with antialiasing enabled.\n\n";
  29.  
  30. ! The camera will be positioned along the negative y axis
  31. ! looking at the origin.
  32.  
  33. CAMERA'POS = [0,-3500,350];
  34. CAMERA'TARGET = [0,0,200];
  35.  
  36.  
  37. ! Define colors for this scene
  38.  
  39. ORANGE : COLOR ( RGB, [0.7,0.4,0.2] );
  40. BLUE   : COLOR ( RGB, [0,0,1] );
  41. YELLOW : COLOR ( RGB, [1,1,0] );
  42.  
  43.  
  44. ! Define surfaces for the spheres, with varying kb.  ks and n
  45. ! should also be modified so that specular hilites will also
  46. ! become hazier as we move from the left sphere to the right
  47. ! sphere.
  48.  
  49. !                      ka  kd  ks  n   km  kr  ir  kb     flags
  50. SURF1 : SURFACE(PHONG, 0.6,0.3,0.4,100.0,0.7,0.0,0.0,0.00,0 );
  51. SURF2 : SURFACE(PHONG, 0.6,0.3,0.3, 50.0,0.7,0.0,0.0,0.05,0 );
  52. SURF3 : SURFACE(PHONG, 0.6,0.3,0.3, 10.0,0.7,0.0,0.0,0.10,0 );
  53. SURF4 : SURFACE(PHONG, 0.6,0.3,0.2,  5.0,0.7,0.0,0.0,0.15,0 );
  54. SURF5 : SURFACE(PHONG, 0.6,0.3,0.2,  2.0,0.7,0.0,0.0,0.20,0 );
  55.  
  56. ! Define a surface for the ground (gingham pattern)
  57.  
  58. !                      ka kd ks n  km kr ir kb flags
  59. MATTE : SURFACE(PHONG, 1, 1, 0, 0, 0, 0, 0, 0, 0 );
  60.  
  61.  
  62. ! Create the row of spheres
  63.  
  64. SPHERE( [-1000,0,250], 225, ORANGE, SURF1 );
  65. SPHERE( [ -500,0,250], 225, ORANGE, SURF2 );
  66. SPHERE( [    0,0,250], 225, ORANGE, SURF3 );
  67. SPHERE( [  500,0,250], 225, ORANGE, SURF4 );
  68. SPHERE( [ 1000,0,250], 225, ORANGE, SURF5 );
  69.  
  70.  
  71. ! Specify the ambient light.
  72.  
  73. AMBIENT( [0,0,0], [0.6,0.6,0.6], [0,0,1], 0, 0 );
  74.  
  75. ! Specify the STAR light.
  76.  
  77. STAR( [2000,-5000,4000], [1,.9,1], 300 );
  78.  
  79.  
  80. ! Set the background color to a dark purple
  81.  
  82. BACKGROUND( PLAIN, [0,0.05,0.15] );
  83.  
  84.  
  85. ! Make the ground plane.  This time we'll use a gingham pattern
  86.  
  87. GROUND( GINGHAM, 0, 400, BLUE, MATTE, YELLOW, MATTE );
  88.  
  89.  
  90. ! The scene has now been constructed, render it!
  91.  
  92. RENDER;
  93.  
  94.  
  95. ! All scripts must terminate with an END
  96.  
  97. END
  98.